package 观察者模式;

public class Test {
    public static void main(String[] args) {
        System.out.println(args);
        Subject subject = new Boss1();

        Observer observer = new StockObserver("皮卡丘",subject);
        Observer observer2 = new StockObserver2("卡皮丘",subject);

        subject.Attach(observer);
        subject.Attach(observer2);
        subject.setSubjectState("发现旷工");
        subject.Notify();
    }
}
